import React, { Component } from 'react'
import Device from '../../types/Device'
import './basicDeviceInfo.less'
import moment from 'moment'

interface IProps {
    device: Device
}
export default class BasicDeviceInfo extends Component<IProps> {
    render() {
        const { device } = this.props
        return (
            <div className="basicDeviceInfo">
                <h2>
                    <b>
                        {device.deviceName}
                    </b>
                </h2>
                设备ID：{device.deviceID}<br />
                最后修改时间：{moment(device.lastModifiedTime).format('YYYY-MM-DD')}<br />
                所属厂商ID：{device.manufacturerID}
            </div>
        )
    }
}
